import React from "react";

class Li extends React.Component {
  constructor(props) {
    super(props);
    this.toDetail = this.toDetail.bind(this);
  }

  render() {
    let { item } = this.props;
    return (
      <div className="home-list-swiper" onClick={()=> {this.toDetail(item.flowerId)}}>
        {item.goodName}
      </div>
    );
  }

  toDetail(flowerId) {
    this.props.history.push('/home/detail/'+flowerId);
  }
}

export default Li;
